<?php
// +----------------------------------------------------------------------
// | Yzncms [ 御宅男工作室 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2018 http://yzncms.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | fastadmin: https://www.fastadmin.net/
// +----------------------------------------------------------------------

// +----------------------------------------------------------------------
// | 邮箱验证码接口
// +----------------------------------------------------------------------
namespace app\api\controller;

use app\api\model\AccessTokenModel;
use app\api\model\Token;
use app\common\controller\Api;
use app\common\library\Ems as Emslib;
use app\common\model\DouyinModel;
use app\common\model\ItemModel;
use app\common\model\SourceModel;
use app\common\model\StaffModel;
use app\member\model\Member;
use think\Db;
use think\Exception;
use think\facade\Hook;
use think\facade\Validate;
use think\Request;
use util\Http;

/**
 * @title 抖音
 * @controller api\controller\Ems
 * @group base
 */
class Douyin extends Api
{

    public function getDyItemList(){
        $data = (new ItemModel())->getDyItemList($this->request_array);
        $data['code'] == 200 ? $this->success($data['msg'],$data['data']) : $this->error($data['msg']);
    }

    public function dyLogin(Request $request){
        $data = (new DouyinModel())->dyLogin($this->request_array);
        $data['code'] == 200 ? $this->success($data['msg'],$data['data']) : $this->error($data['msg']);
    }


    public function getDyAccount(){
        $data = (new DouyinModel())->getDyAccount($this->request_array);
        $data['code'] == 200 ? $this->success($data['msg'],$data['data']) : $this->error($data['msg']);
    }

    public function delDy(){
        $data = (new DouyinModel())->delDy($this->request_array);
        $data['code'] == 200 ? $this->success($data['msg'],$data['data']) : $this->error($data['msg']);
    }
}
